package com.myaxuan.controller;

import com.myaxuan.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by pc255 on 2018/4/11.
 */

@Controller
public class Hello {

	@Autowired
	private HelloService helloService;
	
	@RequestMapping("/hello/{name}")
	@ResponseBody
	public String  index(@PathVariable("name") String name){
		return helloService.hello(name);
	}
}
